Makefile.dist-packaging: fix make rpm with submodules
authorGiuseppe Scrivano <gscrivan@redhat.com>
Mon, 2 Mar 2015 10:39:51 +0000 (11:39 +0100)
committerColin Walters <walters@verbum.org>
Tue, 3 Mar 2015 17:16:17 +0000 (12:16 -0500)
Makefile.dist-packaging seems to assume to be run under packaging/ as
"make -C packaging -f Makefile.dist-packaging rpm" so ensure the
srcdir is set correctly to point to the parent directory.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
packaging/Makefile.dist-packaging

index 103b1e8c0ef08e71883e1f73fc20ffaee537c72d..e1389ebd49fe451f8a84525bf2c56041c853100b 100644 (file)
@@ -3,7 +3,7 @@
 GITREV = $$(git describe --always --tags)
 GITREV_FOR_PKG = $(shell echo "$(GITREV)" | sed -e 's,-,\.,g' -e 's,^v,,')
 
-srcdir=$(shell pwd)
+srcdir=$(shell dirname `pwd`)
 PACKAGE=ostree
 
 PKG_VER = $(PACKAGE)-$(GITREV_FOR_PKG)
@@ -30,4 +30,4 @@ srpm: dist-snapshot
         ./rpmbuild-cwd -bs $(PACKAGE).spec
 
 rpm: srpm
-       $(srcdir)/rpmbuild-cwd --rebuild $(PKG_VER)*.src.rpm
+       ./rpmbuild-cwd --rebuild $(PKG_VER)*.src.rpm